'use strict';
const db = uniCloud.database() //对数据库的对象获取；

exports.main = async (event, context) => {
    const collection = db.collection('record-list') //对record-list数据库的获取；
    // 添加数据
    let res = await collection.add({
        turtle_id: event.turtle_id,
        record: {
			time: event.record.time,
			title: event.record.title,
			text_container: event.record.text_container,
            type: event.record.type,
            imgsList: event.record.imgsList
		}
    })
 
    return {
    	code: 200,
    	message: 'ok',
    	data: event
    }
}